package com.ruoyi.shop.modules.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.shop.modules.domain.Comment;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 商品评价Mapper接口
 *
 * @author zjc
 * @date 2024-07-02
 */
public interface CommentMapper extends BaseMapper<Comment>
{


    /**
     * 新增商品评价
     *
     * @param comment 商品评价
     * @return 结果
     */
    int insertComment(Comment comment);


    @Select(value = "select * from prd_comment where product_id=#{pid}")
    List<Comment> selectCommentListByProductId(@Param("pid") Long pid);
}
